//会员管理列表。
Ext.define("ES.view.membership.MembershipList",{
    extend:"Ext.grid.Panel",
    alias:"widget.membershipTabList",
    closable:true,
    title:"会员管理",
    store:"MembershipStore",
    selType:"checkboxmodel",
    multiSelect:true,
    frame:true,
    layout:{
        type:"fit",
        align:"stretch"
    },
    sortableColumns:false,
    viewConfig:{
        forceFit:true,
        columnLines:true,
        stripRows:true
    },
    tbar:{
           xtype:"toolbar",
           height:36,
           items:["会员名称/帐号：",{
                   xtype:"textfield",
                   width:168
           }," ",{
                   xtype:"button",
                   action:"btnQuery",
                   iconCls:'search-trigger-icon',
                   text:"检索",
                   tooltip:"检索数据"
           },"->",{
                   xtype:"button",
                   action:"btnAdd",
                   iconCls:"add-icon",
                   text:"新增",
                   tooltip:"新增数据"
           },"-",{
                   xtype:"button",
                   action:"btnDelete",
                   iconCls:"delete-icon",
                   text:"删除",
                   tooltip:"删除数据"
           }]
   },
   bbar:[{
            xtype:"pagingtoolbar",
            store:"MembershipStore",
            displayInfo:true
    }],
    columns:[{
        header:"序号",
        width:32,
        align:"right",
        xtype:"rownumberer"
    },{
        text:"会员名称",
        width:128,
        align:"left",
        menuDisabled:true,
        sortable:false,
        flex:1,
        dataIndex:"memberName"
    },{
        text:"会员帐号",
        width:128,
        align:"left",
        menuDisabled:true,
        sortable:false,
        flex:3,
        dataIndex:"memberSign"
    },{
        text:"状态",
        width:64,
        align:"left",
        menuDisabled:true,
        sortable:false,
        dataIndex:"memberStatus",
        renderer:function(val){
            if(val == 0){
                return "暂停使用";
            }else if(val == 1){
                return "正常使用";
            }
            return val;
        }
    }],
    initComponent:function(){
       this.callParent(arguments);
    }
})